package ro.fortech.peaa.service.api;

import java.util.List;

import ro.fortech.peaa.domain.Job;

/**
 * Interface for Job Identity Map 
 * @author robert
 *
 */
public interface IJobIdentityMap {
	/** 
	 * Put an Job on the IdentityMap. If it already exist in the 
	 * IdentityMap, it replaces it.
	 * @param emp 
	 */
	public void put(Job job) throws Exception;
	
	/**
	 * Return the job with the given id from the IdentityMap, or null if
	 * there is no job with that id.
	 * @param id
	 * @return job
	 */
	public Job get(String id) throws Exception;
	
	/**
	 * Remove job from IdentityMap
	 * @param job
	 * @throws Exception
	 */
	public void remove(Job job) throws Exception;
	
	/**
	 * Return number of Jobs in map.
	 * @return number of Jobs
	 * @throws Exception
	 */
	public Integer size() throws Exception;
	
	/**
	 * Get all Jobs from the map
	 * @return list of all Jobs
	 * @throws Exception
	 */
	public List<Job> getAll() throws Exception;

}
